<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:s="http://jboss.org/schema/seam/taglib"
      xmlns:a="http://richfaces.org/a4j">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>JBoss Suites: Seam Framework</title>
	<link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>
<body id="pgHome">
<div id="document">
	<div id="header">
		<div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
	</div>
	<div id="container">
		<div id="sidebar"></div>
		<div id="content">
			<div class="section">
				<h1>Register</h1>
			</div>
			<div class="section">
                
                <h:form id="register">
				<fieldset>
				
                	<s:decorate template="edit.xhtml" id="usernameDecorate">
		    			<ui:define name="label">Username:</ui:define>
						<h:inputText id="username" value="#{user.username}" required="true">
                                        <a:ajax event="blur" reRender="usernameDecorate"/>
                        </h:inputText>
					</s:decorate>
					
					<s:decorate template="edit.xhtml" id="nameDecorate">
		    			<ui:define name="label">Real Name:</ui:define>
						<h:inputText id="name" value="#{user.name}" required="true">
                          	<a:ajax event="blur" reRender="nameDecorate"/>
                        </h:inputText>
					</s:decorate>		
						
					<s:decorate id="passwordDecorate" template="edit.xhtml">
		    			<ui:define name="label">Password:</ui:define>
						<h:inputSecret id="password" value="#{user.password}" required="true"/>
					</s:decorate>
						
					<s:decorate id="verifyDecorate" template="edit.xhtml">
		    			<ui:define name="label">Verify Password:</ui:define>
						<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
					</s:decorate>
					
					<div class="entry errors">
						<h:messages id="messages" globalOnly="true"/>
					</div>
					
					<div class="entry">
						<div class="label">&#160;</div>
						<div class="input">
							<h:commandButton id="register" value="Register" action="#{register.register}"/>&#160;
							<s:button id="cancel" value="Cancel" view="/home.xhtml"/>
						</div>
					</div>
					
				</fieldset>
                </h:form>
                
			</div>			
		</div>
	</div>
	<div id="footer">Created with JBoss EJB 3.0, Seam, JSF (Mojarra), and Facelets</div>
</div>
</body>
</html>
